package com.hfut.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.hfut.dao.UserDao;
import com.hfut.model.Book;
import com.hfut.model.Images;
import com.hfut.model.Message;
import com.hfut.model.RequestBook;
import com.hfut.model.User;
import com.hfut.service.UserService;

@Component
public class UserServiceImpl implements UserService{
	private UserDao userDao;
	
	public UserDao getUserDao() {
		return userDao;
	}
	@Resource
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	
	public int login(User u) {
		return userDao.login(u);
	}
	
	public boolean register(User u) {
		return userDao.register(u);
	}
	
	public boolean newBook(Book b) {
		return userDao.newBook(b);
	}
	
	public List<Book> findBook(String bookName) {
		return userDao.find(bookName);
	}
	
	public boolean deleteBook(Book b) {
		return userDao.deleteBook(b);
	}
	public boolean newMessage(Message m) {
		return userDao.newMessage(m);
	}
	public boolean newRequest(RequestBook b) {
		return userDao.newRequest(b);
	}

}
